package com.godyao.mall.order.repository;

import com.godyao.mall.order.model.Order;
import org.aspectj.weaver.ast.Or;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * @author godyao
 * @date 2022/4/1
 */
@Repository
public interface OrderRepository extends JpaRepository<Order, Long> {

    /**
     * 动态条件分页查找
     * @param spec
     * @param pageable
     * @return
     */
    Page<Order> findAll(Specification<Order> spec, Pageable pageable);
}
